#ifndef __HEAD_H__
#define __HEAD_H__

#include <func.h>
#define NETDISK_LOG_INFO(buf,time) {syslog(LOG_INFO,"INFO_MESAGE=%s\n,time:%s\n",buf,ctime(&now));}                           
#define NETDISK_LOG_DEBUG(ret,retval,func_name) {if(ret==retval){printf("line=%d  ",__LINE__);printf("file=%s  ",__FILE__);perror(func_name);return -1;}}

typedef struct train_s
{
    int length;
    char data[1000];
} train_t;

enum
{
    CD,LS,PUTS,GETS,REMOVE,PWD,MKDIR,RMDIR,GETS2
};

int epollAdd(int epfd, int fd);
int epollDel(int epfd, int fd);
int whichOrder(char* orderList,int* orderflag,char* args);
int transOrder(int sockfd,int orderflag,char* args);
int Login(char* username,char* userpasswd,int sockfd);
int lsRecv(int sockfd);
int pwdRecv(int sockfd);
int puts_client(int netfd,char*path,char*filename);
int gets_client(int netfd);
int gets_client2(int netfd,char *filename);

#endif

